import Instance from "@/utils/http.ts";

const BASE_URL = `/projectInfo/`

// 获取所有项目信息
export function getProjectListAPI(current:number,pageSize:number){
    return Instance({
        url:BASE_URL+`getAll`,
        method:'GET',
        params:{
            current,
            pageSize,
        }
    })
}

// 新增一条项目数据
export function addProjectAPI(data:{}){
    return Instance({
        url:BASE_URL+`saveOne`,
        method:'POST',
        data,
    })
}
// 删除一条项目数据
export function deleteProjectAPI(id:number){
    return Instance({
        url:BASE_URL+`${id}`,
        method:'DELETE',
    })
}
// 修改一条项目数据
export function updateProjectAPI(data:{}){
    return Instance({
        url:BASE_URL+`modifyOne`,
        method:'PUT',
        data:data
    })
}

// 获取一条项目数据
export function getOneProjectAPI(id:number){
    return Instance({
        url:BASE_URL+`${id}`,
        method:'GET',
    })
}